btc(F-mirror F2): unify merged-mining PPLNS weight delta — ADAPTed on F1 (#85) - #320
Merged
Conversation
…_delta Collapse the three divergent V36 merged-weight delta implementations (the compute_merged_payout_hash inline walk, ensure_v36_skiplist, and per-chain ensure_merged_skiplist) into merged_weights_delta() + merged_weights_delta_for_hash(), mirroring LTC F2 (08f2690) and p2pool MergedWeightsSkipList.get_delta (data.py:1864). chain_id==nullopt drives the hash/v36 path (no merged-address resolution); a chain_id value drives the per-chain path (Tier 1 explicit, Tier 1.5 retroactive with normalize as a lookup probe only, else default key). BTC keeps the F1 raw default (#85): default key was already the raw parent script in all three sites, so this is a pure structural unification with no key-semantics change. Applies the canonical (1,{},0,0)-after-key-resolves shape -- the hash-path variant previously set totals before the empty-script check, inflating the denominator for degenerate empty-script shares; convertible scripts are unaffected. Drops the non-consensus [DOGE-TIER] per-share debug log. Held on btc/f-mirror-prep, unopened, pending crossing-soak dispatch. Merged-payout KATs green: V36CrossImplRefHash (3) + PPLNSConsensus (11), 14/14. (cherry picked from commit 53f2229)
frstrtr
added a commit
that referenced
this pull request
Jun 23, 2026
btc(F-mirror F2): unify merged-mining PPLNS weight delta — ADAPTed on F1 (#85)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Operator decision (via integrator): option (a) ADAPT F2 to preserve the F1 raw-key work already landed in #85 (btc/v36-parity-f1-rawkey, merge f532429). This is NOT a blind mirror of the LTC F2 patch.
What it does
Composes on F1, no key-semantics change
Fence: BTC tree only — src/impl/btc/share_tracker.hpp (+105/-153). No bitcoin_family/ or src/core/ touched.
Cherry-picked clean onto current master (3326b94) atop F1; no conflict with #85.
Tests: merged-payout KATs 14/14 green — V36CrossImplRefHash (3) + PPLNSConsensus (11). GPG-signed.